package mvp.levelup.web.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: valera
 * Date: 5/3/14
 * Time: 1:05 PM
 */
@WebFilter(filterName = "TestFilter1")
public class TestFilter1 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        request.setAttribute("filter1", "success");
        chain.doFilter(request, response);
        //adds
    }

    @Override
    public void destroy() {

    }
}
